<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子34-ES6/7常用语法介绍</title>
    </head>

    <body>
        <pre>
            <code>
                // 例子34

                let proto = {w: 30};
                let obj = {x: 10};
                Object.setPrototypeOf(obj, proto);
                console.log(Object.getPrototypeOf(obj)); // {w: 30}
                proto.y = 20;
                proto.z = 40;
                console.log(obj.x); // 10
                console.log(obj.y);	// 20
                console.log(obj.z);	// 30
                console.log(obj.w);	// 40
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/34.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>

</html>